﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using WebComponents.Data;
using WebComponents;
using System.Collections.Generic;

public partial class chi_tiet_tin : System.Web.UI.Page {
  protected void Page_Load(object sender, EventArgs e) {
     ArticleInfo article = ArticleController.GetByArticleID(ConvertType.ToInt(Request.Params["id"]));
     if (article != null) {
       this.Title = article.Title;
       article.ViewCount += 1;
       ArticleController.UpdateViewCount(article.ArticleID);
       lblTitle.Text = article.Title;
       lblDescription.Text = article.Description;
       lblContent.Text = article.Content;
       List<ArticleInfo> listR = ArticleController.GetArticleRelease(article.ArticleID);
       if (listR.Count > 0) {
         rptNewsRelease.DataSource = listR;
         rptNewsRelease.DataBind();
       } else
         rptNewsRelease.Visible = false;
     }
  }
}
